#!/bin/bash
#
# Copyright (c) 2012 - mDroidd (martijn.ruijzendaal@gmail.com)
#
# Please ask permission to use parts of this script
# I will be happy to give you!
#
# Credits go to: imagemagick, tommytomatoe, bash, internet
#

#
# Attention! Because the source section is device-specific, I made some
# Values here to make it easier for you to edit.
#
	function Source
	{

	if ! [ -d $ScriptDir/WORKING_DIR_$1 ]
	then
		mkdir $ScriptDir/WORKING_DIR_$1
		cd $ScriptDir/WORKING_DIR_$1
	else
		cd $ScriptDir/WORKING_DIR_$1
	fi
	if ! [ -d $ScriptDir/WORKING_DIR_$1/.repo ]
	then
	   if [ "$1" = "1" ]
	   then
	    GBSOURCE
	   fi
	   if [ "$1" = "2" ]
	   then
	    ICSSOURCE
	   fi
	   if [ "$1" = "3" ]
	   then
	    CMSOURCE
	   fi
	   if [ "$1" = "4" ]
	   then
	    OxGBSOURCE
	   fi
	   if [ "$1" = "5" ]
	   then
	    AOKPSOURCE
	   fi
	   if [ "$1" = "6" ]
	   then
	    OxICSSOURCE
	   fi
	   if [ "$1" = "7" ]
	   then
	    MiuiSOURCE
	   fi
	   if [ "$1" = "8" ]
	   then
	    CnaSource
	   fi
	fi
	repo sync
	}


	ICSSOURCE="Stock AOSP ICS Source"

# ^^ Is the value that will be displayed in menu

	function ICSSOURCE
	{
	repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
	}

# ^^ That are the commands that will be executed when option is chosen
# Change the "repo init -u" to the one who ported the ROM to your device or stock

	GBSOURCE="Stock AOSP GB Source"

	function GBSOURCE
	{
	repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
	}

	CMSOURCE="Official CyanogenMod7 Source"

	function CMSOURCE
	{
	repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
	}

	OxGBSOURCE="Oxygen source"

	function OxGBSOURCE
	{
	repo init -u git://github.com/oxygen-rom/android_manifest.git -b gingerbread
	}

	AOKPSOURCE="Android Open Kang SOURCE (ICS)"

	function AOKPSOURCE
	{
	repo init -u https://github.com/AOKP/platform_manifest.git -b master
	}

	OxICSSOURCE="[UNAVAILABLE]Oxygen ICS Source"

	function OxICSSOURCE
	{
	repo init -u
	}
	
	MIUISOURCE="[NEW] MIUI V4 ICS Source (Incomplete)"
	
	function MiuiSource
	{
	git clone git://github.com/miuiandroid/MIUI-ROM-V4.0--Ice-Cream-Sandwich-.git -b ics
	}

	CNASOURCE="[NEW] CodeName Android Source (ICS)"
	function CnaSource
	{
	repo init -u git://github.com/CNA/android_manifest.git -b mod-4.0.3
	}
#
# End of section
#

